bitkeeper revision 1.12 (3e00b95a3fK0b9XF_UVth6TivqeezA)
authorsmh22@uridium.cl.cam.ac.uk <smh22@uridium.cl.cam.ac.uk>
Wed, 18 Dec 2002 18:07:22 +0000 (18:07 +0000)
committersmh22@uridium.cl.cam.ac.uk <smh22@uridium.cl.cam.ac.uk>
Wed, 18 Dec 2002 18:07:22 +0000 (18:07 +0000)
fix silly large mem request => panic death bug

.bk-to-hg
.hg-to-bk
.rootkeys
xen-2.4.16/common/page_alloc.c

index cd3d4032d74590a2112fbb6ae62d3e696cd88182..ce02b86560fe455b71e42f1ad7e15ec23504e460 100755 (executable)
--- a/.bk-to-hg
+++ b/.bk-to-hg
@@ -1,6 +1,6 @@
 #!/bin/sh -x
 set -e
-test -L foo
-rm      foo
+test -L xenolinux-2.4.16-sparse/include/asm-xeno/hypervisor-ifs
+rm      xenolinux-2.4.16-sparse/include/asm-xeno/hypervisor-ifs
 (find -depth -type d -print | xargs -r rmdir 2>/dev/null) || true
 exit 0
index aa8849ce08a47ab9a1bad9831019ec2ee5850c65..07880721154794568e79fe6c9a274082c1a80432 100755 (executable)
--- a/.hg-to-bk
+++ b/.hg-to-bk
@@ -1,5 +1,8 @@
 #!/bin/sh -x
 set -e
-ln -s ../../../xen-2.4.16/include/hypervisor-ifs/ foo
+mkdir -p xenolinux-2.4.16-sparse
+mkdir -p xenolinux-2.4.16-sparse/include
+mkdir -p xenolinux-2.4.16-sparse/include/asm-xeno
+ln -s ../../../xen-2.4.16/include/hypervisor-ifs xenolinux-2.4.16-sparse/include/asm-xeno/hypervisor-ifs
 (find -depth -type d -print | xargs -r rmdir 2>/dev/null) || true
 exit 0
index 05dda51e57341960944e720a8c43dde8eb49454e..dc4843677af4764f916bcf4d3ecff2ba2466c68b 100644 (file)
--- a/.rootkeys
+++ b/.rootkeys
@@ -1,7 +1,6 @@
 3ddb6b0bKlMz_dz-M59a1mkUa1lASw BitKeeper/etc/config
 3ddb6b0buTaC5zg1_a8FoAR9FWi_mw BitKeeper/etc/ignore
 3ddb79c9_hgSp-gsQm8HqWM_9W3B_A BitKeeper/etc/logging_ok
-3deb3f5bhXnxocVMiXaeZ0L7fQBGaw foo
 3ddb79bcbOVHh38VJzc97-JEGD4dJQ xen-2.4.16/Makefile
 3ddb79bcCa2VbsMp7mWKlhgwLQUQGA xen-2.4.16/README
 3ddb79bcWnTwYsQRWl_PaneJfa6p0w xen-2.4.16/Rules.mk
 3ddb79batzR40ZFY9dvgs5f1aM9I6g xenolinux-2.4.16-sparse/include/asm-xeno/hdreg.h
 3ddb79b90xBgbeYgCcImS2ZxJakxBA xenolinux-2.4.16-sparse/include/asm-xeno/highmem.h
 3ddb79baXLZV3dUKQI2gIYpAy67RuA xenolinux-2.4.16-sparse/include/asm-xeno/hw_irq.h
+3e00b957iYsdTI1x6THRwMoWSPIW2Q xenolinux-2.4.16-sparse/include/asm-xeno/hypervisor-ifs
 3ddb79bapQ9Z9ewa5O1pqAVaNBTazg xenolinux-2.4.16-sparse/include/asm-xeno/hypervisor.h
 3ddb79baL-pjPI8hg5xjPgd4__SlOA xenolinux-2.4.16-sparse/include/asm-xeno/i387.h
 3ddb79ba66TwvG7HpbBo04fRhmj3KQ xenolinux-2.4.16-sparse/include/asm-xeno/ide.h
index b7cd2c1a7b9567a70e2983e4b30c63ef58e4b1e7..72785c8a35038570738e6f8862d3eab042ba9c53 100644 (file)
@@ -178,13 +178,19 @@ unsigned long __get_free_pages(int mask, int order)
 
     spin_lock_irqsave(&alloc_lock, flags);
 
-    /* Found smallest order which can satisfy the request. */
-    for ( i = order; FREELIST_EMPTY(free_list[i]); i++ ) 
-    {
-        if ( i == FREELIST_SIZE ) 
-            panic("Out of memory!\n");
+
+    /* Find smallest order which can satisfy the request. */
+    for ( i = order; i < FREELIST_SIZE; i++ ) {
+       if ( !FREELIST_EMPTY(free_list[i]) ) 
+           break;
     }
 
+    if ( i == FREELIST_SIZE )
+    {
+        printk("Cannot handle page request order %d!\n", order);
+       return NULL; 
+    }
     /* Unlink a chunk. */
     alloc_ch = free_list[i];
     free_list[i] = alloc_ch->next;